package com.mao.service;

import com.mao.dao.ConsumerMapper;
import com.mao.entity.Consumer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author Kechelle
 * @Date 2020/9/8 14:33
 * @Version 1.0
 */
@Service
public class ConsumerServiceImpl implements ConsumerService {

    @Autowired
    private ConsumerMapper consumerMapper;

    @Override
    public boolean addUser(Consumer consumer) {
        return consumerMapper.insert(consumer)>0 ? true:false;
    }

    @Override
    public List<Consumer> getAllUser() {
        return consumerMapper.selectAllUser();
    }
}
